<style>
    #reportDetail-edit .layui-form-label {
        width:128px;
    }
    #reportDetail-edit .layui-input-block {
        margin-left: 158px;
    }
    #reportDetail-edit .layui-panel {
        margin-top: 10px;
    }
    #reportDetail-edit .fileName {
        height: 20px;
        line-height: 20px;
        color: #2D8CF0;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        display: inline-block;
        padding-right: 5px;
        cursor: pointer;
    }
</style>
<div class="layui-fluid" id="reportDetail-edit">
    <form class="layui-form" action="" lay-filter="reportDetail-edit-form">
        <div class="layui-card">
            <blockquote class="layui-elem-quote layui-elem-quote-primary">事故信息</blockquote>
            <div class="layui-field-box">
                <div class="layui-form-item febs-hide">
                    <label class="layui-form-label febs-form-item-require">：报告id</label>
                    <div class="layui-input-block">
                        <input type="text" name="reportId" th:value="${accidentReport.reportId}" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">事故标题：</label>
                            <div class="layui-input-block layui-input-block-html " th:text="${accidentReport.accidentTitle}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">

                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">事故类型：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentType">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">事故等级：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentLevel">
                            </div>
                        </div>

                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">发生时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentDate}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">发生地点：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentAreaName}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">作业类别：</label>
                            <div class="layui-input-block layui-input-block-html" name="jobOperation">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">报告主管部门：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptFlg == '1'?'是':'否'}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item febs-hide" id="noticeDeptDiv">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">主管部门名称：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptName}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">上报时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptDate}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">所属科室：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.deptName}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">所属班组：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.deptTeamName}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">相关人员：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.correlationUser}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">是否人员伤亡：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.casualtyFlg == '1'?'是':'否'}">
                            </div>
                        </div>
                    </div>
                </div>

                <div th:if="${accidentReport.casualtyFlg == '1'}">
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs12">
                                <label class="layui-form-label layui-form-label-detail ">伤亡简述：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.casualtyRemark}">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">初步损失情况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.preliminarilyDamage}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">初步描述：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.preliminarilyDescript}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">上报附件：</label>
                        <div class="layui-input-block layui-input-block-html" id="uploadReportBtn">
                        </div>
                    </div>
                </div>

            </div>
        </div>
<!--        (调查状态): 1:待调查指派 2：已分配待调查-->
        <div class="layui-card" th:if="${accidentReport.surveyStatus!='1' && accidentReport.surveyStatus!='2'}">
            <blockquote class="layui-elem-quote layui-elem-quote-primary">调查结果</blockquote>
            <div class="layui-field-box">

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">事故经过及原因：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentElapse}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故等级：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentLevel">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">死亡人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.deathToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">重伤人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.severeInjuryToll}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">轻伤人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.slightInjuryToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">失踪人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.missingToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">直接经济损失：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.economyLoss}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">事故概况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentOverview}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任部门：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.leaderDeptName}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任人姓名：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.leaderRealName}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任人工号：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.leaderUserNo}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任比例(%)：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationRatio}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">责任认定：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationCognizance}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">责任人处理情况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.leaderDisposeCondition}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <label class="layui-form-label layui-form-label-detail">伤亡人员：</label>
                        <div class="layui-input-block layui-input-block-html">
                            <div class="jhg-body-table">
                                <table lay-filter="injuryUserTable" id="injuryUserTable" lay-data="{id: 'injuryUserTable'}"></table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">调查附件：</label>
                        <div class="layui-input-block layui-input-block-html" id="uploadReportSurveyBtn">
                        </div>
                    </div>
                </div>
                <div class="layui-card" th:if="${not #lists.isEmpty(accidentReport.reportReasonList)}">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary">事故原因</blockquote>
                    <div class="layui-card-body" id="reason_box">

                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<div style="height: 45%" class="febs-container" id="baseCautionaryLesson-edit">
    <div class="febs-open-body">
        <form class="layui-form" action="" lay-filter="baseCautionaryLesson-edit-form" style="padding-top: 30px">
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">学习情况</blockquote>
                <div class="layui-form-item febs-hide">
                    <label class="layui-form-label febs-form-item-require">：</label>
                    <div class="layui-input-block">
                        <input type="text" name="cautionaryLessonId" class="layui-input">
                        <input type="text" name="tenantId" autocomplete="off" class="layui-input"
                               maxlength="32" >
                        <input type="text" name="cautionarySourceId" autocomplete="off" class="layui-input"
                               maxlength="32" >
                        <input type="text" name="cautionaryDeptId" autocomplete="off" class="layui-input"
                               maxlength="32" >
                    </div>
                </div>
                <div class="layui-form-item febs-hide">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label">学习时间：</label>
                            <div class="layui-input-block">
                                <input type="text" name="studyDate" id="studyDate" lay-verify="datetime"
                                       placeholder="请输入时间" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label febs-form-item-require">学习备注：</label>
                            <div class="layui-input-block">
                                <textarea name="studyRemark" class="layui-textarea" maxlength="900" placeholder="请输入备注" lay-verify="required"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item febs-hide">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label febs-form-item-require">警示状态：</label>
                            <div class="layui-input-block">
                                <select name="status" id="status" lay-search="">
                                    <option value="0">待学习</option>
                                    <option value="1">已学习</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label">附件上传：</label>
                            <div class="layui-input-block" id="uploadBtn">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item febs-hide">
                    <button class="layui-btn" lay-submit="" lay-filter="baseCautionaryLesson-edit-form-submit" id="submit"></button>
                    <button type="reset" class="layui-btn" id="reset"></button>
                </div>
            </div>
        </form>
    </div>
</div>
<script data-th-inline="javascript">
    var accidentReportData = [[${accidentReport}]];
    var accidentReportReasonData = [[${accidentReportReason}]];
    var injuryLevelList = [[${injuryLevelList}]];
    var baseCautionaryLessonData = [[${baseCautionaryLesson}]];
</script>
<script th:src="@{/febs/js/base/baseCautionaryLesson/accidentReportDetailForLesson.js(v=1)}"></script>